package com.qsl.ssyx.client.cart;

import com.qsl.ssyx.model.order.CartInfo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("service-cart")
public interface CartFeignClient {

    @ApiOperation("获取购物车里选中的商品-根据用户Id")
    @GetMapping("/api/cart/inner/getCartCheckedList/{userId}")
    public List<CartInfo> getCartCheckedList(@ApiParam(value = "用户Id", required = true) @PathVariable Long userId);


    @ApiOperation("根据用户id,获取当前用户选中购物车选中选中的商品")
    @GetMapping("/api/cart/inner/getCartListByUserId/{userId}")
    public List<CartInfo> getCartCheckedListByUserId(@ApiParam(value = "用户Id", required = true) @PathVariable Long userId);
}
